/*
 * Copyright © 2004-2014 chenYuan. All rights reserved.
 * @Website:wwww.jspx.net
 * @Mail:39793751@qq.com
 * @author: chenYuan , 陈原
 * @License: Jspx.net Framework Code is open source (LGPL)，Jspx.net Framework 使用LGPL 开源授权协议发布。
 * @jvm:jdk1.6+  x86/amd64
 *
 */
package com.jspx.sioc;

import com.jspx.sioc.factory.LifecycleObject;

import java.util.Map;


/**
 * Created by IntelliJ IDEA.
 * User:chenYuan (mail:39793751@qq.com)
 * Date: 2007-2-12
 * Time: 16:57:15
 */

public interface BeanFactory
{

    IocContext getIocContext();
    
    void setIocContext(IocContext iocContext);

    Object getBean(String beanName);

    Object getBean(String beanName, String namespace);

    boolean registerBeanSingleton(String beanName, LifecycleObject lifecycleObject);

    boolean containsBean(String beanName);

    boolean containsBean(String beanName, String namespace) throws Exception;

    boolean isSingleton(String beanName, String namespace) throws Exception;

    void shutdown();

    Object createEntry(LifecycleObject lifecycleObject) throws Exception;

    String[] getAliases(String beanName,String namespace);

    LifecycleObject getLifecycleObject(String beanName,String namespace) throws Exception;

    void setRef(Object o,String namespace) throws Exception ;

    Map<String,String> getApplicationMap();

}